import {Component, ViewChild} from '@angular/core';
import {BaseSelectAlain2Schema} from '@sb/base/select/base-select-alain2-schema';
import {BaseSelectAlain2Component} from '@sb/base/select/base-select-alain2.component';
import {BaseService} from '@sb/base';
import {SysBackupTemplateSelectComponent} from '../sys-backup-template-select/sys-backup-template-select.component';
import {SysBackupTemplateService} from '../service/sys-backup-template.service';
import {SysBackupTemplateSearchForm} from '../entity/sys-backup-template-search-form';


export interface SysBackupTemplateSelectAlainSchema extends BaseSelectAlain2Schema<SysBackupTemplateSearchForm> {
    mode?: string;

    valueChange?: (value: string) => any;
}


@Component({
    selector: 'sys-backup-template-select-alain',
    templateUrl: './sys-backup-template-select-alain.component.html',
    styleUrls: ['./sys-backup-template-select-alain.component.less'],
    providers: [
        {
            provide: BaseService,
            useClass: SysBackupTemplateService

        }
    ]
})
export class SysBackupTemplateSelectAlainComponent extends BaseSelectAlain2Component<SysBackupTemplateSelectAlainSchema> {
    /* 用于注册小部件 KEY 值 */
    static readonly KEY = 'sys-backup-template-select-alain';

    @ViewChild(SysBackupTemplateSelectComponent, {static: false})
    sysBackupTemplateSelectComponent: SysBackupTemplateSelectComponent;
}
